from rest_framework import routers
from django.urls import path
from DataStatistics.views import defectDataViewSet
from DataStatistics import views

urlpatterns = []


DataStatistics_url = routers.SimpleRouter()
DataStatistics_url.register(r'defectForm', defectDataViewSet)


urlpatterns.append(path(r'defectData/', views.import_data)) # 瑕疵所有的json数据
urlpatterns.append(path(r'defectDataFilter', views.defectDataFilter))
urlpatterns.append(path(r'defectDataBatchFilter', views.defectDataBatchFilter))
urlpatterns.append(path(r'defectMapFilter', views.defectMapFilter))
urlpatterns.append(path(r'defectBatchAndReel', views.defectBatchAndReel))
urlpatterns.append(path(r'defectImage', views.defectImage)) # 图片接口
urlpatterns.append(path(r'readDefectImage', views.readDefectImage)) # 读图片文件夹路径接口
urlpatterns.append(path(r'defectLatest', views.defectLatest)) # 最新瑕疵检测
urlpatterns.append(path(r'defectallBatchReel', views.defectallBatchReel)) # # 所有订单号和卷号查询
urlpatterns.append(path(r'defectReadDir', views.defectReadDir)) # 获取文件夹信息
urlpatterns.append(path(r'defectDelDir', views.defectDelDir)) # 删除文件夹
urlpatterns.append(path(r'defectGetImageByDirName', views.defectGetImageByDirName)) # 获取指定文件夹中图片路径
urlpatterns.append(path(r'defectGetImageByName', views.defectGetImageByName)) # 获取指定图片
urlpatterns.append(path(r'defectClearFile', views.defectClearFile)) # 修改清除脚本执行时间
urlpatterns.append(path(r'defectByBatchnum',views.defectByBatchnum)) # 根据订单号查卷号机器号
urlpatterns.append(path(r'defectGetDelDay',views.defectGetDelDay)) # 获取自动删除天数
urlpatterns.append(path(r'defectSetDelDay',views.defectSetDelDay)) # 设置自动删除天数
urlpatterns.append(path(r'defectTimeFilter',views.defectTimeFilter)) # 根据时间范围查询单号
urlpatterns += DataStatistics_url.urls